package com.zbkj.front.controller.assistant;


import com.zbkj.front.controller.assistant.service.AssistantQuickReplyService;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * 快捷回复表 前端控制器
 */
@Slf4j
@RestController
@RequestMapping("api/front/assistant/quick-reply")
@Api(tags = "客服-快捷回复") //配合swagger使用

public class AssistantQuickReplyController {

//    @Autowired
//    private AssistantQuickReplyService assistantQuickReplyService;

//    /**
//     * 分页显示快捷回复表
//     * @param request 搜索条件
//     * @param pageParamRequest 分页参数
//     * @author keNan
//     * @since 2025-06-11
//     */
//    @ApiOperation(value = "分页列表") //配合swagger使用
//    @RequestMapping(value = "/list", method = RequestMethod.GET)
//    public CommonResult<CommonPage<AssistantQuickReply>>  getList(@Validated AssistantQuickReplySearchRequest request, @Validated PageParamRequest pageParamRequest) {
//        CommonPage<AssistantQuickReply> assistantQuickReplyCommonPage = CommonPage.restPage(assistantQuickReplyService.getList(request, pageParamRequest));
//        return CommonResult.success(assistantQuickReplyCommonPage);
//    }
//
//    /**
//     * 新增快捷回复表
//     * @param assistantQuickReplyRequest 新增参数
//     * @author keNan
//     * @since 2025-06-11
//     */
//    @ApiOperation(value = "新增")
//    @RequestMapping(value = "/save", method = RequestMethod.POST)
//    public CommonResult<String> save(@RequestBody @Validated AssistantQuickReplyRequest assistantQuickReplyRequest) {
//        AssistantQuickReply assistantQuickReply = new AssistantQuickReply();
//        BeanUtils.copyProperties(assistantQuickReplyRequest, assistantQuickReply);
//
//        if(assistantQuickReplyService.save(assistantQuickReply)) {
//            return CommonResult.success();
//        } else {
//            return CommonResult.failed();
//        }
//    }
//
//    /**
//     * 删除快捷回复表
//     * @param id Integer
//     * @author keNan
//     * @since 2025-06-11
//     */
//    @ApiOperation(value = "删除")
//    @RequestMapping(value = "/delete", method = RequestMethod.GET)
//    public CommonResult<String> delete(@RequestParam(value = "id") Integer id) {
//        if(assistantQuickReplyService.removeById(id)) {
//            return CommonResult.success();
//        } else {
//            return CommonResult.failed();
//        }
//    }
//
//    /**
//     * 修改快捷回复表
//     * @param id integer id
//     * @param assistantQuickReplyRequest 修改参数
//     * @author keNan
//     * @since 2025-06-11
//     */
//    @ApiOperation(value = "修改")
//    @RequestMapping(value = "/update", method = RequestMethod.POST)
//    public CommonResult<String> update(@RequestParam Integer id, @RequestBody @Validated AssistantQuickReplyRequest assistantQuickReplyRequest) {
//        AssistantQuickReply assistantQuickReply = new AssistantQuickReply();
//        BeanUtils.copyProperties(assistantQuickReplyRequest, assistantQuickReply);
//        assistantQuickReply.setId(id);
//
//        if(assistantQuickReplyService.updateById(assistantQuickReply)) {
//            return CommonResult.success();
//        } else {
//            return CommonResult.failed();
//        }
//    }
//
//    /**
//     * 查询快捷回复表信息
//     * @param id Integer
//     * @author keNan
//     * @since 2025-06-11
//     */
//    @ApiOperation(value = "详情")
//    @RequestMapping(value = "/info", method = RequestMethod.GET)
//    public CommonResult<AssistantQuickReply> info(@RequestParam(value = "id") Integer id) {
//        AssistantQuickReply assistantQuickReply = assistantQuickReplyService.getById(id);
//        return CommonResult.success(assistantQuickReply);
//    }
}



